package com.jingxi.service;

import com.jingxi.mapper.TbItemCatMapper;
import com.jingxi.model.TbItemCat;
import com.jingxi.model.TbItemCatExample;
import com.jingxi.model.TbItemCatExample.Criteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class TbItemCatServiceImpl implements TbItemCatService {
    @Autowired
    TbItemCatMapper tbItemCatMapper;
    @Override
    public List<TbItemCat> getTbItemCatList(Long parentId) throws Exception {
        TbItemCatExample tbItemCatExample=new TbItemCatExample();
        Criteria criteria=tbItemCatExample.createCriteria();
        criteria.andParentIdEqualTo(parentId);
        List<TbItemCat>li=tbItemCatMapper.selectByExample(tbItemCatExample);
        return li;
    }
}
